package com.web.interceptor;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;

/**
 * 功能：项目全局拦截器,目前该拦截器未实现业务
 * @author chenxm
 *
 */
public class AuthInterceptor implements Interceptor {
	private final Log log = LogFactory.getLog(AuthInterceptor.class);
	
	public void intercept(ActionInvocation ai) {
		ai.invoke();
		//检查用户是否登录
		/*
		Object user = ai.getController().getSessionAttr("sessionUser");
		if (user == null) {
			ai.getController().render("/view/login/login.html");
		}else{
			ai.invoke();
		}
		*/
	}
	
}
